/*
 * @Author: Zhang
 * @Date: 2020-05-17 12:15:59
 * @LastEditTime: 2020-09-03 00:20:42
 * @LastEditors: firesky
 */
import Vue from 'vue'
import Router from 'vue-router'
import constantRouterMap from './router'

// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading

Vue.use(Router)

export default new Router({
  // mode: 'history', //后端支持可开
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
})
